<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="/Public/Home/css/common.css" rel="stylesheet" type="text/css" />
<link href="/Public/Home/css/style.css" rel="stylesheet" type="text/css" />
<script src="/Public/Home/js/jquery-1.8.3.min.js" type="text/javascript"></script>
<script src="/Public/Home/js/jquery.SuperSlide.2.1.1.js" type="text/javascript"></script>
<script src="/Public/Home/js/common_js.js" type="text/javascript"></script>
<script src="/Public/Home/js/footer.js" type="text/javascript"></script>
<title>食品商场</title>
</head>
<script type="text/javascript" charset="UTF-8">
<!--
 //点击效果start
 function infonav_more_down(index)
 {
  var inHeight = ($("div[class='p_f_name infonav_hidden']").eq(index).find('p').length)*30;//先设置了P的高度，然后计算所有P的高度
  if(inHeight > 60){
   $("div[class='p_f_name infonav_hidden']").eq(index).animate({height:inHeight});
   $(".infonav_more").eq(index).replaceWith('<p class="infonav_more"><a class="more"  onclick="infonav_more_up('+index+');return false;" href="javascript:">收起<em class="pulldown"></em></a></p>');
  }else{
   return false;
  }
 }
 function infonav_more_up(index)
 {
  var infonav_height = 85;
  $("div[class='p_f_name infonav_hidden']").eq(index).animate({height:infonav_height});
  $(".infonav_more").eq(index).replaceWith('<p class="infonav_more"> <a class="more" onclick="infonav_more_down('+index+');return false;" href="javascript:">更多<em class="pullup"></em></a></p>');
 }
   
 function onclick(event) {
  info_more_down();
 return false;
 }
 //点击效果end  
//-->
</script>
<body>
<div id="header_top">
    <div id="top">
        <div class="Inside_pages">
          <div class="Collection">
            <?php if(is_login()): ?><span id="loginbtn"  class="green"><?php echo get_username();?></span>
               <a href="<?php echo U('User/logout');?>" class="f12">退出</a>
                <?php else: ?>
                <a href="<?php echo U('User/login');?>" class="green">请登录</a> 
                <a href="<?php echo U('User/register');?>" class="green">免费注册</a><?php endif; ?>
            </div>
            <div class="hd_top_manu clearfix">
                <ul class="clearfix">
                    <li class="hd_menu_tit" data-addclass="hd_menu_hover">
                    <a href="<?php echo U('Index/index');?>">首页</a></li>
                    <li class="hd_menu_tit" data-addclass="hd_menu_hover">
                    <a href="#">消息中心</a></li>
                    <li class="hd_menu_tit" data-addclass="hd_menu_hover">
                    <a href="<?php echo U('Leibiao/index');?>">商品列表</a></li>
                    <li class="hd_menu_tit" data-addclass="hd_menu_hover">
                    <a href="#">我的购物车<b></b></a></li>
                </ul>
            </div>
        </div>
    </div>
    <div id="header"  class="header page_style">
        <div class="logo"><a href="index.html"><img src="/Public/Home/images/logo.png" /></a></div>
        <!--结束图层-->
        <form class="Search" method="post" action="<?php echo U('Lei/index');?>">
            <div class="search_list">
                <ul>
                    <li class="current">产品</li>
                </ul>
            </div>
            <div class="clear search_cur">
                <input name="title" id="searchName" class="search_box" onkeydown="keyDownSearch()" type="text" value="">
                <input name="" type="submit" value="搜 索"  class="Search_btn"/>
            </div>
        </form>
        <!--购物车样式-->
        <div class="hd_Shopping_list" id="Shopping_list">
            <div class="s_cart">
            <a href="<?php echo U('Shops/index');?>">我的购物车</a>
           
        
             </div>
        </div>
    </div>
	<div class="Navigation" id="Navigation">
		 <ul class="Navigation_name">
			<li><a href="<?php echo U('Index/index');?>">首页</a></li>
       <li class="hour">
       <span class="bg_muen">
            </span>
            <a>半小时生活圈</a></li>
			<li><a href="<?php echo U('Leibiao/index');?>">新品专区</a>
     	    <em class="hot_icon"></em></li>
			
		 </ul>			 
		</div>
    <script>$("#Navigation").slide({titCell:".Navigation_name li",trigger:"click"});</script> 
</div>
</head>


<div id="member_info2"></div>
<script type="text/javascript">
$(function(){
    collection('a#collection');
    fcbox("#login_now", true); //登录弹窗
});
function collection(id){
    $(id).click(function(){
        var goods_id = $(this).attr('oprid');
        $.post(www_domain + "/user/collection", { is_ajax : 1, ids : goods_id, collection : 1 },
                function(result){
                    alert(result);
        }, "json");
    });
}
var refresh_gift_card_list = function(){};
function pop_login(){
    $("#login_now").trigger("click");
}
</script>

<div id="main">
    <div class="w930 m0a mt30">
  <div class="right_style">
  <div class="title_style"><em></em>订单管理</div> 
   <div class="Order_form_style">
      <div class="Order_form_list">
         <table>
         <thead>
          <tr><td class="list_name_title0">商品</td>
          <td class="list_name_title1">单价(元)</td>
          <td class="list_name_title2">数量</td>
          <td class="list_name_title6">操作</td>
         </tr>
         </thead>

         <?php if(is_array($shop)): $i = 0; $__LIST__ = $shop;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?><tbody>       
           <tr class="Order_info">
           <td colspan="6" class="Order_form_time">
           <input tabindex="13" type="checkbox" class="fuxuan" id="flat-checkbox-1">下单时间：<?php echo (time_format($v["addtime"])); ?> | 订单号：<?php echo ($v["ding"]); ?></td></tr>
           <tr class="Order_Details">
           <td colspan="3">
           <table class="Order_product_style">
           <tbody>
           <tr>
           <td>
            <div class="product_name clearfix">
            <a href="#" class="product_img">
            <img src="/Uploads/<?php echo ($picd[$key]); ?>" width="80px" height="80px"></a>
            </div>
            </td>
            <td width="300px" style="margin: auto;">
            <a ><?php echo ($title[$key]); ?></a>
            </td>
            <td class="danjia"><?php echo ($prices[$key]); ?></td>
           <td>
           <span class="add">+</span>
           <input style="width:40px" type="text" name="num" value="<?php echo ($v["num"]); ?>" class="float-lt choose_input"/>
          <span class="lose">-</span>
          </td>
            </tr>
            </tbody></table>
           </td>   
           <td class="operating">
                <a href="<?php echo U('Xiang/index',array('id'=>$v['gid']));?>">查看详细</a>
                <a href="<?php echo U('Shops/delete',array('id'=>$v['id']));?>">删除</a>
          </td>
           </tr>

           </tbody><?php endforeach; endif; else: echo "" ;endif; ?> 


         </table>
  
   <script>
            $(document).ready(function(){
              $('.Order_form_style input').iCheck({
                checkboxClass: 'icheckbox_flat-green',
                radioClass: 'iradio_flat-green'
              });
            });
            </script>
  </div>
 </div>
</div>
        <div class="w930 m0a">
            <div class="fl">
                <div class="mt50">
                    <a href="<?php echo U('Jiesuan/index');?>" class="f14 bold c999 b_1_efe btnf7f w146 h40 fl tc">继续购物</a>
                </div>
            </div>
            <div class="fr">
                <div class="tc cd00 mt20">
                    <span class="f13 bold">商品总额：￥</span>
                    <span class="f20" id="goods_amount">0</span>
                </div>
                
                <div class="mt20 tr">
                    <input type="hidden" id="all_has_stock" value="1">
                <input onclick="<?php echo U('Jiesuan/index');?>" type="submit" class="btnd00 w146 h40 f16 bold" value="去结算" />
                </div>
            </div>
        </div>
    </div>
</div>
<div id="dsp" style="display:none;">
<link rel="stylesheet" href="/Public/Home/css/2.css">
<script type="text/javascript">
var _mvq = _mvq || [];
_mvq.push(['$setAccount', 'm-25646-0']);
_mvq.push(['$setGeneral', 'cartview', '', '', '0']);
_mvq.push(['$logConversion']);
_mvq.push(['$addItem', '', '25523', '','']);
_mvq.push(['$logData']);
</script>
</div>
<link rel="stylesheet" href="css/fancybox.css" type="text/css">
<script type="text/javascript" src="Script/fancybox.js"></script>
<div id="kfs" style="display: none; ">
  <div class="context"> <a href="javascript:void(0);" onclick="javascript:NTKF.im_openInPageChat(&#39;kf_9988_1341905703263&#39;);_gaq.push([&#39;_trackEvent&#39;,&#39;kefuxiaochuang&#39;, &#39;tousu&#39;, location.href]);" class="show" title="打开" rel="nofollow">&nbsp;</a> </div>
</div>
<script src="/Public/Home/js/jquery-1.8.3.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(function(){

  KFHover('.context span');
});
function KFHover(ipt){
    $(ipt).hover(function(){
        var cls     = $(this).attr('class');
        var css  = cls.substr(cls.lastIndexOf("kf_btn"), 8) ;
        $(this).removeClass(css).addClass(css + 'Hover');
    },function(){
        var cls     = $(this).attr('class');
        var css  = cls.substr(cls.lastIndexOf("kf_btn"), 8);
        $(this).removeClass(css + 'Hover').addClass(css);
    });
}
    $(function(){ 
      $('.add').click(function(){
          var index = $('.add').index($(this));
         
          var num=$('input[name=num]').eq(index).val();
            num++;
              var r = /^[0-9]*[1-9][0-9]*$/;
                if(!r.test(num)){
                    num=Math.floor(num);
                }
              $('input[name=num]').eq(index).val(num);     
        });


     $('.lose').click(function(){
         var index = $('.lose').index($(this));
         var num=$('input[name=num]').eq(index).val();
            num--;
              var r = /^[0-9]*[1-9][0-9]*$/;
                if(!r.test(num)){
                    num=Math.floor(num);
                }
                if (num<1) {
                  num=1;
                }
                $('input[name=num]').eq(index).val(num);
              });


       $('.checkbox').click(function(){
        if($(this).is(":checked")){
          var zongjia=<?php echo ($zongjia); ?>;
          $('.fuxuan').prop("checked",true);
          $('.f20').html(zongjia);
        }else{
           $('.fuxuan').prop("checked",false);
        }
          })
        var zongjia=0;
       $('.fuxuan').click(function(){
        var index=$('.fuxuan').index($(this));
        var price=Number($(".danjia").eq(index).html());
        var num=($(".choose_input").eq(index).val());
        //alert(index);
        if($(this).is(":checked")){
          zongjia+=price*num;
          $('.f20').html(zongjia);
        }else{
          zongjia-=price*num;
           $('.f20').html(zongjia);
        }
       })
       $('.add').click(function(){
        var index=$('.add').index($(this));
        var price=Number($(".danjia").eq(index).html());
        var num=($(".choose_input").eq(index).val());
        //alert(index);
        if($('.fuxuan').is(":checked")){
          zongjia+=price;
          $('.f20').html(zongjia);
        }
       });
       $('.lose').click(function(){
        var index=$('.lose').index($(this));
        var price=Number($(".danjia").eq(index).html());
        var num=($(".choose_input").eq(index).val());
        //alert(index);
        if(num>1){
        if($('.fuxuan').is(":checked")){
          zongjia-=price;
          $('.f20').html(zongjia);
        }
      }else{
         $('.f20').html(price);
      }
       });
       });
   
</script>
  </div>
     </div>
   </div>


<div class="copyright">
    <div class="copyright-bg">
        <div class="hotline">为生活充电在线 <span>招商热线：****-********</span> 客服热线：400-******</div>
        <div class="hotline co-ph">
            <p>版权所有Copyright ©***************</p>
            <p>*ICP备***************号 不良信息举报</p>
            <p>总机电话：****-*********/194/195/196 客服电话：4000****** 传 真：********
                
                E-mail:****@****.gov.cn</p>
        </div>
    </div>
</div>
<!--右侧菜单栏购物车样式-->
<div class="fixedBox">
    <ul class="fixedBoxList">
         <a href="<?php echo U('Shops/index');?>">
        <li class="fixeBoxLi cart_bd" style="display:block;" id="cartboxs">
            

            <span class="fixeBoxSpan"></span> <strong>购物车</strong>
            <div class="cartBox">
                <div class="bjfff"></div>
                <div class="message">购物车内暂无商品，赶紧选购吧</div>
            </div>
        </li>
        </a>
        <li class="fixeBoxLi Service "> <span class="fixeBoxSpan"></span> <strong>客服</strong>
            <div class="ServiceBox">
                <div class="bjfffs"></div>
                <dl onclick="javascript:;">
                    <dt><img src="/Public/Home/images/Service1.png"></dt>
                    <dd><strong>QQ客服1</strong>
                        <p class="p1">9:00-22:00</p>
                        <p class="p2"><a href="http://wpa.qq.com/msgrd?v=3&amp;uin=123456&amp;site=DGG三端同步&amp;menu=yes">点击交谈</a></p>
                    </dd>
                </dl>
                <dl onclick="javascript:;">
                    <dt><img src="/Public/Home/images/Service1.png"></dt>
                    <dd> <strong>QQ客服1</strong>
                        <p class="p1">9:00-22:00</p>
                        <p class="p2"><a href="http://wpa.qq.com/msgrd?v=3&amp;uin=123456&amp;site=DGG三端同步&amp;menu=yes">点击交谈</a></p>
                    </dd>
                </dl>
            </div>
        </li>
        <li class="fixeBoxLi code cart_bd " style="display:block;" id="cartboxs"> <span class="fixeBoxSpan"></span> <strong>微信</strong>
            <div class="cartBox">
                <div class="bjfff"></div>
                <div class="QR_code">
                    <p><img src="images/erweim.jpg" width="180px" height="180px" /></p>
                    <p>微信扫一扫，关注我们</p>
                </div>
            </div>
        </li>
        <li class="fixeBoxLi BackToTop"> <span class="fixeBoxSpan"></span> <strong>返回顶部</strong> </li>
    </ul>
</div>
</body>
</html>